Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@types/koa-compress
Advanced tools
TypeScript definitions for koa-compress
npm install --save @types/koa-compress
This package contains type definitions for koa-compress (https://github.com/koajs/compress).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-compress.
/* =================== USAGE ===================
import compress = require("koa-compress");
var Koa = require('koa');
var app = new Koa();
app.use(compress());
=============================================== */
/// <reference types="node" />
/// <reference types="koa" />
import * as Koa from "koa";
import * as zlib from "zlib";
/**
* Compress middleware for Koa
*/
declare function koaCompress(options?: koaCompress.CompressOptions): Koa.Middleware;
declare namespace koaCompress {
export interface CompressOptions {
/**
* An optional function that checks the response content type to decide whether to compress. By default, it uses compressible.
*/
filter?: ((mimeType: string) => boolean) | undefined;
/**
* Minimum response size in bytes to compress. Default 1024 bytes or 1kb.
*/
threshold?: number | string | undefined;
/**
* An optional string, which specifies what encoders to use for requests
* without Accept-Encoding. Default: 'idenity'.
*/
defaultEncoding?: string | undefined;
/**
* Options for brotli compression.
*/
br?: zlib.BrotliOptions | false | undefined;
/**
* Options for gzip compression.
*/
gzip?: zlib.ZlibOptions | false | undefined;
/**
* Options for deflate compression.
*/
deflate?: zlib.ZlibOptions | false | undefined;
}
}
export = koaCompress;
These definitions were written by Jerry Chin, and Joel Gallant.
FAQs
TypeScript definitions for koa-compress
The npm package @types/koa-compress receives a total of 43,443 weekly downloads. As such, @types/koa-compress popularity was classified as popular.
We found that @types/koa-compress demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.